package com.yunfei.common.json.tree;

import java.util.List;
/**
 * tree 转换为json 工具类
 */
public class TreeJsonUtil {
    /**
     * 返回tree json
     * @param treeDataList
     * @return
     */
    public static Object getTreeJson(List<?> treeDataList) {
        String jsonStr = "";
        TreeJsonRootBean jsonRootBean=new TreeJsonRootBean();
        jsonRootBean.setErrorNo("0");
        TreeResults treeResults=new TreeResults();
        treeResults.setData(treeDataList);
        jsonRootBean.setResults(treeResults);
      /*  Gson gson=new Gson();
        jsonStr= gson.toJson(jsonRootBean);*/
        return jsonRootBean;
    }

}
